﻿@attribute [JSCustomElement]

<a href="@Href"
   target="@_target"
   class="app-link text-decoration-none primary--text font-weight-medium d-inline-flex"
   @onclick="@OnClick"
   @onclick:preventDefault="IsSamePage"
   @onclick:stopPropagation="StopPropagation"
   @attributes="@Attributes">
    @if (!IsSamePage)
    {
        @Content
    }

    @if (Icon is not null)
    {
        <MIcon Class="@($"m{(IsSamePage ? "r" : "l")}-1")" Color="primary" Size="@(".875rem")">@Icon</MIcon>
    }

    @if (IsSamePage)
    {
        @Content
    }
</a>
